home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_09_05
/
9n05022b
< prev
next >
Wrap
Text File
|
1991-03-17
|
349b
|
30 lines
#include <stdio.h>
#define NUMELEM(a) (sizeof(a)/sizeof(a[0]))
char *command[] = {
"ADD",
"DELETE",
"LIST",
"REPLACE"
};
main()
{
int i;
for (i = 0; i < NUMELEM(command); ++i)
printf("command[%d]: %s\n", i, command[i]);
}
output:
command[0]: ADD
command[1]: DELETE
command[2]: LIST
command[3]: REPLACE